import type { RouteRecordRaw } from 'vue-router'
import { Layout } from '@/utils/routerHelper'

const systemRoutes: RouteRecordRaw[] = [
  {
    path: '/system',
    name: 'System',
    component: Layout,
    meta: {
      title: '系统管理'
    },
    children: [
      {
        path: 'dict',
        name: 'SystemDict',
        component: () => import('@/views/System/Dict/Index.vue'),
        meta: {
          title: '字典管理'
        }
      },
      {
        path: 'menu',
        name: 'SystemMenu',
        component: () => import('@/views/System/Menu/Index.vue'),
        meta: {
          title: '菜单管理'
        }
      },
      {
        path: 'user',
        name: 'SystemUser',
        component: () => import('@/views/System/User/Index.vue'),
        meta: {
          title: '用户管理'
        }
      },
      {
        path: 'role',
        name: 'SystemRole',
        component: () => import('@/views/System/Role/Index.vue'),
        meta: {
          title: '角色管理'
        }
      },
      {
        path: 'authority',
        name: 'SystemAuthority',
        component: () => import('@/views/System/Authority/Index.vue'),
        meta: {
          title: '权限管理'
        }
      }
    ]
  }
]

export default systemRoutes
